<template>
	<view>
		<view class="flex flex-ai-c flex-jc-sb" style="background: #fff;padding: 32rpx;" v-for="(item,i) in list" :key="item.id" @click="skip((item))">
			<view>
				<view class="font-32">订单号：{{item.order.order_sn}}</view>
				<view class="font-24 color-2" style="margin-top: 20rpx;">{{item.order.paytime}}</view>
			</view>
			<view class="font-40" :class="[swiperCurrent == 0?'color-1':'color-3']">{{swiperCurrent == 0?'+':'-'}}{{item.amount}}</view>
		</view>
		<view v-if="!list.length" style="height: 50vh;" class="flex flex-jc-c flex-ai-c">
			<u-empty text="数据为空" mode="list"></u-empty>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default:() => []
			},
			swiperCurrent: {
				type: Number,
				default: 0
			}
		},
		data() {
			return {
				
			}
		},
		methods: {
			skip(item){
				uni.navigateTo({
					url: `/pages/order/details?id=${item.order_id}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.font-40{
		font-size: 40rpx;
	}
	.color-1{
		color: #FCB527;
	}
	.color-2{
		color: #999999;
	}
	.color-3{
		color: #F95533;
	}
</style>